<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
    <script type="text/javascript">
        const p = new Promise((resolve, reject) => {
        //    1.调用resolve函数
        //     resolve("ok");
        //    2.调用reject函数
        //     reject("error");
        //    3.抛出错误
            throw 'Error';
        });
        
        p.then((val) => {

        }, (err) => {

        });

        console.log(p);
    </script>
</body>
</html>